Matthias Clasen [Sun, 22 Mar 2015 19:14:42 +0000 (15:14 -0400)]
More of the same
A similar case in GtkIconHelper. Here we were confusing ourselves,
and compared a icon_size against -1, although the variable is
never set to -1.
Matthias Clasen [Sun, 22 Mar 2015 19:12:30 +0000 (15:12 -0400)]
Avoid some clang compiler warnings
Avoid some compiler warnings from clang in deprecated code.
Most of these are around our habit of using -1 as an 'unset'
value for enumerations.
Matthias Clasen [Sun, 22 Mar 2015 18:40:57 +0000 (14:40 -0400)]
Fix some clang warnings
It complains about double const, and it is right.
Matthias Clasen [Sun, 22 Mar 2015 17:48:02 +0000 (13:48 -0400)]
Make the blur code compile with clang
clang complains that the expression involving sqrt() is not
constant, and thus refuses to accept it as a case label. So,
use precomputed values instead.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
Matthias Clasen [Sun, 22 Mar 2015 15:55:33 +0000 (11:55 -0400)]
Fix the build
Matthias Clasen [Sun, 22 Mar 2015 15:47:23 +0000 (11:47 -0400)]
tooltip: Minor cleanup
Preserve the symmetry in gtk_tooltip_set_last_window.
Matthias Clasen [Sun, 22 Mar 2015 15:46:16 +0000 (11:46 -0400)]
search bar: Clean up weak pointer handling
Break out a setter that manages the weak pointer, and
use it in finalize. This also fixes a bug where we were
forgetting to disconnect the right signal handler in
some cases.
Matthias Clasen [Sun, 22 Mar 2015 15:45:19 +0000 (11:45 -0400)]
mount operation: Minor formatting cleanup
The pattern for g_object_add_weak_pointer calls is to
have the same expression in both arguments.
Matthias Clasen [Sun, 22 Mar 2015 15:44:37 +0000 (11:44 -0400)]
menu button: Minor cleanup
Preserve the symmetry in set_align_widget_pointer.
Matthias Clasen [Sun, 22 Mar 2015 15:44:00 +0000 (11:44 -0400)]
Clean up some unfortunate formatting
"if (...) do" just looks wrong.
Matthias Clasen [Sun, 22 Mar 2015 15:13:08 +0000 (11:13 -0400)]
dnd: Introduce a helper to manage the weak pointer
Introduce a setter that takes care of updating the weak ref
whenever we assign info->widget. Just a cleanup of the previous patch.
Tom Hughes [Sun, 22 Mar 2015 10:55:00 +0000 (10:55 +0000)]
DND: Clean up weak pointers when they are no longer needed
Failure to do so leads to memory corruption down the road.
This was introduced in commit
650c25e06c17.
https://bugzilla.gnome.org/show_bug.cgi?id=746602
Christian Kirbach [Sun, 22 Mar 2015 11:07:20 +0000 (11:07 +0000)]
Updated German translation
Jordi Mas [Sun, 22 Mar 2015 08:18:27 +0000 (04:18 -0400)]
Upload Catalan translation
Matthias Clasen [Sun, 22 Mar 2015 06:11:03 +0000 (02:11 -0400)]
Add an index for new api to the docs
Matthias Clasen [Sun, 22 Mar 2015 05:57:57 +0000 (01:57 -0400)]
radio-menu-item: Add join_group()
The other Radio* widgets have this convenience method that removes the
memory management of the opaque GSList used to handle the group from the
API usable from language bindings (especially the ones not based on
introspection).
This commit adds gtk_radio_menu_item_join_group().
https://bugzilla.gnome.org/show_bug.cgi?id=671362
Matthias Clasen [Sun, 22 Mar 2015 05:54:08 +0000 (01:54 -0400)]
radio-menu-item: Allow arguments to be NULL
Some arguments, like the group and the label of a RadioMenuItem, can be
NULL: the RadioMenuItem has all the code to deal with them. The argument
validation is too strict, though, for instance doing:
return_if_fail (IS_RADIO_MENU_ITEM (foo))
if (foo != NULL)
set_foo (foo)
Which is obviously incorrect.
This commit also modifies the annotations of the API, to ensure that
language bindings do the right thing.
https://bugzilla.gnome.org/show_bug.cgi?id=671362
Emmanuele Bassi [Mon, 5 Mar 2012 13:09:47 +0000 (13:09 +0000)]
radio-menu-item: Handle a !NULL group
If we create a RadioMenuItem without a group, and then set a group, the
menu item will still be set as active, which means an inconsistently
drawn radio menu item - as the RadioMenuItem will set the active flag on
itself, but then it won't reset it when it gets a new group.
https://bugzilla.gnome.org/show_bug.cgi?id=671362
Matthias Clasen [Sun, 22 Mar 2015 06:00:04 +0000 (02:00 -0400)]
Start 3.17 development
Bump the version to 3.17.0 and add version macros.
Olivier Fourdan [Wed, 11 Mar 2015 12:52:21 +0000 (13:52 +0100)]
Improve CSD decorations without a compositor
It turned out that using mwm hints to instruct wms to
create border-only decorations is not really working
universally. So, instead of doing this, render a solid
frame without shadow on the client-side to handle this
case.
https://bugzilla.gnome.org/show_bug.cgi?id=746222
Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Matthias Clasen [Sat, 31 Jan 2015 04:32:50 +0000 (23:32 -0500)]
image: Optimize non-resize changes
When the image content is changed, only queue a resize
if the size is actually changing, otherwise just a
redraw. Suggested by Owen in
https://bugzilla.gnome.org/show_bug.cgi?id=613833
Christian Hergert [Sat, 21 Mar 2015 21:17:39 +0000 (14:17 -0700)]
a11y: handle atk race condition where widget has been destroyed
If the widget has been destroyed since a DBus message had been sent,
we could be in a condition that the widget pointer exists but it does
not have a window.
This bails as if the widget didn't exist if there is no available
GdkWindow.
We also set the extents to 0 to be defensive since this is a vfunc
implementation.
https://bugzilla.gnome.org/show_bug.cgi?id=746586
Muhammet Kara [Sat, 21 Mar 2015 21:25:38 +0000 (21:25 +0000)]
Updated Turkish translation
Alexander Larsson [Fri, 20 Mar 2015 13:56:42 +0000 (14:56 +0100)]
box-shadow: For top/bottom and left/right parts, repeat a single line
Since these part really are the same in all of the x or y direction
and we don't blur in that direction we can just blur one line and
repeat it during drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
Alexander Larsson [Fri, 20 Mar 2015 13:34:44 +0000 (14:34 +0100)]
shadow-box: Blur only horizontally/vertically for the non-corner parts
There is no need to e.g. blur in the x-direction for the top part
of a box shadow. Also, there is no need to extend the mask in the
non-blurred direction.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
Alexander Larsson [Fri, 20 Mar 2015 13:31:57 +0000 (14:31 +0100)]
shadow-box: Bail out blur early if radius is 1px
For radius 1px the current implementation rounds down to a 1 px box
filter which is a no-op. Rather than creating useless shadow masks
in this case we bail out blurring early.
Another alternative would be to make radius 1px round up to a 2 px box
filter, but that would change the rendering of Adwaita which is probably
not a great idea this late in the cycle.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
Alexander Larsson [Thu, 19 Mar 2015 15:29:32 +0000 (16:29 +0100)]
gtkcairoblur: Unroll inner loop for common radius values
This unrolls the inner blur loop for radius 1-10, allowing
the compiler to use a divide-by-constant operation instead
of a generic division.
Here is the blur-performance output before:
Radius 1: 124.95 msec, 32.01 kpixels/msec:
Radius 2: 117.27 msec, 34.11 kpixels/msec:
Radius 3: 123.57 msec, 32.37 kpixels/msec:
Radius 4: 118.17 msec, 33.85 kpixels/msec:
Radius 5: 119.32 msec, 33.52 kpixels/msec:
Radius 6: 124.17 msec, 32.21 kpixels/msec:
Radius 7: 121.04 msec, 33.05 kpixels/msec:
Radius 8: 130.64 msec, 30.62 kpixels/msec:
Radius 9: 119.47 msec, 33.48 kpixels/msec:
Radius 10: 117.95 msec, 33.91 kpixels/msec:
Radius 11: 122.38 msec, 32.68 kpixels/msec:
Radius 12: 121.92 msec, 32.81 kpixels/msec:
Radius 13: 125.45 msec, 31.89 kpixels/msec:
Radius 14: 121.63 msec, 32.89 kpixels/msec:
Radius 15: 120.18 msec, 33.28 kpixels/msec:
And after:
Radius 1: 42.26 msec, 94.65 kpixels/msec:
Radius 2: 59.15 msec, 67.62 kpixels/msec:
Radius 3: 60.29 msec, 66.35 kpixels/msec:
Radius 4: 64.53 msec, 61.99 kpixels/msec:
Radius 5: 60.07 msec, 66.59 kpixels/msec:
Radius 6: 62.43 msec, 64.07 kpixels/msec:
Radius 7: 60.36 msec, 66.27 kpixels/msec:
Radius 8: 59.59 msec, 67.13 kpixels/msec:
Radius 9: 76.17 msec, 52.51 kpixels/msec:
Radius 10: 79.41 msec, 50.37 kpixels/msec:
Radius 11: 118.92 msec, 33.64 kpixels/msec:
Radius 12: 121.31 msec, 32.97 kpixels/msec:
Radius 13: 118.30 msec, 33.81 kpixels/msec:
Radius 14: 116.82 msec, 34.24 kpixels/msec:
Radius 15: 116.99 msec, 34.19 kpixels/msec:
I.e. almost double performance for the unrolled radius values.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
Alexander Larsson [Thu, 19 Mar 2015 15:25:25 +0000 (16:25 +0100)]
gtkcairoblur: Minor restructure
This just moves get_box_filter_size to the top and makes
it a macro (so it can be used as a constant later).
https://bugzilla.gnome.org/show_bug.cgi?id=746468
Alexander Larsson [Thu, 19 Mar 2015 15:24:19 +0000 (16:24 +0100)]
Add performance test for gtkcairoblur
This just creates a large cairo surface and times bluring it
at various values of radius.
https://bugzilla.gnome.org/show_bug.cgi?id=746468
hanniedu [Sat, 21 Mar 2015 17:25:17 +0000 (18:25 +0100)]
Updated Dutch translation gtk and gtk-properties master 3.16
Matthias Clasen [Sat, 21 Mar 2015 00:48:25 +0000 (20:48 -0400)]
HighContrast: Fix a typo
Commit
0a39d7d9 introduced a selected_bg_color with a missing $
in front of it.
Gábor Kelemen [Fri, 20 Mar 2015 23:23:24 +0000 (23:23 +0000)]
Updated Hungarian translation
Balázs Úr [Fri, 20 Mar 2015 22:57:03 +0000 (22:57 +0000)]
Updated Hungarian translation
Matthias Clasen [Fri, 20 Mar 2015 20:39:36 +0000 (16:39 -0400)]
reftests: Add a way to compare different runs
gtk-reftest already had an --output=DIR option to tell it where
to save all the resulting images. Now you can combine this with
the --compare-with=DIR option in a second run to make gtk-reftest
compare the .out.png files from the first run with the .out.png
files of the current run, instead of producing .ref.png files.
The intended use for this is to verify that changes do not affect
the generated output.
Rico Tzschichholz [Fri, 20 Mar 2015 19:18:44 +0000 (20:18 +0100)]
mir: Fix version annotation, the mir-backend is available since 3.16
Jakub Steiner [Fri, 20 Mar 2015 12:22:47 +0000 (13:22 +0100)]
fix insensitive and backdrop states
- checkboxes, labels and buttons were a mixed bag for
:insensitive and :backdrop
https://bugzilla.gnome.org/show_bug.cgi?id=746188
Matthias Clasen [Fri, 20 Mar 2015 10:20:30 +0000 (06:20 -0400)]
HighContrast: fix insensitive labels
Make insensitive labels differerent from regular labels.
https://bugzilla.gnome.org/show_bug.cgi?id=746493
Matthias Clasen [Fri, 20 Mar 2015 02:57:10 +0000 (22:57 -0400)]
gtk-demo: Plug a memory leak
Matthias Clasen [Thu, 19 Mar 2015 23:11:39 +0000 (19:11 -0400)]
widget-factory: Fix toolbar on page 3
Set toolbar-style to 'icons' to avoid rectangular buttons.
Kjartan Maraas [Thu, 19 Mar 2015 20:13:10 +0000 (21:13 +0100)]
Updated Norwegian bokmål translation.
Vadim Rutkovsky [Thu, 19 Mar 2015 11:00:01 +0000 (12:00 +0100)]
inspector: show accessible name and description
Carlos Garnacho [Thu, 19 Mar 2015 14:58:00 +0000 (15:58 +0100)]
wayland: Silence warnings on clipboard data sending cancellation
During copy/paste, it may be common that we receive several property changes
around the selection atom, this results in warnings when cancelling the previous
write attempt. We already honor the last request properly, so we should just
cancel silently.
Carlos Garnacho [Thu, 19 Mar 2015 14:54:48 +0000 (15:54 +0100)]
wayland: Ensure we re-request the target if the fd changes
If we receive wl_data_source.target before .send, the target would already
be cached, but we'd take no action on the new fd.
Carlos Garnacho [Thu, 19 Mar 2015 14:49:04 +0000 (15:49 +0100)]
wayland: Don't accept the "TARGETS" target on the wl_data_offer
This is handled separately through the data already cached from the
wl_data_offer.offer handler, we can avoid this request entirely then.
Милош Поповић [Thu, 19 Mar 2015 13:20:12 +0000 (13:20 +0000)]
Updated Serbian translation
Benjamin Otte [Thu, 19 Mar 2015 02:54:38 +0000 (03:54 +0100)]
Adwaita: Fix context menu shadows not showing up
Bastien Nocera [Wed, 18 Mar 2015 10:44:40 +0000 (11:44 +0100)]
inspector: Make it easier to cut'n'paste advice message
The message says "Enable statistics with GOBJECT_DEBUG=instance-count"
but the message itself isn't selectable, making it hard to cut'n'paste.
https://bugzilla.gnome.org/show_bug.cgi?id=746391
Benjamin Otte [Wed, 18 Mar 2015 17:22:17 +0000 (18:22 +0100)]
csspathnode: Handle context going away
Sometimes path nodes can survive longer than the style context that
created them. Don't crash in those cases.
Fixes startup of mutter.
Testcase included.
https://bugzilla.gnome.org/show_bug.cgi?id=746407
Benjamin Otte [Mon, 2 Mar 2015 23:02:25 +0000 (00:02 +0100)]
inspector: Add a new page that lists the CSS node tree
Benjamin Otte [Thu, 5 Mar 2015 19:29:37 +0000 (20:29 +0100)]
cssnode: Add properties
Benjamin Otte [Thu, 5 Mar 2015 16:51:23 +0000 (17:51 +0100)]
csswidgetnode: Use style_changed signal instead of update_style vfunc
Benjamin Otte [Thu, 5 Mar 2015 16:35:57 +0000 (17:35 +0100)]
cssnode: Add a style-changed signal
The signal gets emitted whenever the style needs to be changed.
Benjamin Otte [Sun, 1 Mar 2015 20:33:54 +0000 (21:33 +0100)]
cssnode: Add node-added and node-removed signal
This allows monitoring the CSS tree. For now, moving a child to a
different position relative to its siblings while keeping the same
parent will cause a child-added + child-removed emission.
Benjamin Otte [Sun, 1 Mar 2015 12:14:01 +0000 (13:14 +0100)]
cssnode: Track invalid children
We need to properly track if a node needs to propagate invalidation
state information to its children. We didn't do this properly before and
that could lead to us forgetting to invalidate nodes in corner cases.
Benjamin Otte [Thu, 5 Mar 2015 05:23:35 +0000 (06:23 +0100)]
csswidgetnode: Avoid creating a stylecontext
If the widget doesn't have a style context, don't create one. Instead,
call functions on the widget directly.
Benjamin Otte [Sat, 28 Feb 2015 01:22:38 +0000 (02:22 +0100)]
cssnode: Change the way we invalidate timestamps
Do not propagate the TIMESTAMP change through the node tree, as that
causes lots of uneeded markings of nodes as invalid.
Instead, walk the node tree and find the nodes that have a non-static
style and only invalidate timestamps on those.
Benjamin Otte [Fri, 27 Feb 2015 17:41:13 +0000 (18:41 +0100)]
cssstyle: Add gtk_css_style_is_static()
Gets rid of the need to do
if (ANIMATED_STYLE() &&
animated_style_is_static(ANIMATED_STYLE(style))
Benjamin Otte [Wed, 25 Feb 2015 17:25:01 +0000 (18:25 +0100)]
cssnode: Special-case TIMESTAMP invalidations
Only invalidate timestamps if the node is marked as invalid. We overload
the meaning of "invalid" as "tracks timestamps".
While I don't like the way this is written, it is an important
optimization because 95+% of nodes don't animate so timestamps don't
matter to them. But timestamps are invalidated 60x per second.
Benjamin Otte [Wed, 25 Feb 2015 17:05:07 +0000 (18:05 +0100)]
cssnode: Redo style changed tracking
We don't return a NULL style to mean "no changes" anymore, instead
we check new_style == old_style to mean that.
Make sure the code reflects this, otherwise we'll send
GTK_CSS_CHANGE_PARENT_STYLE invalidations everywhere and screw up
performance.
Benjamin Otte [Mon, 23 Feb 2015 02:06:02 +0000 (03:06 +0100)]
stylecontext: Call get_style(), not create_style()
We want to ensure that the style is created properly.
This also allows making the create_Style() function private.
Benjamin Otte [Sun, 22 Feb 2015 22:28:04 +0000 (23:28 +0100)]
cssnode: Merge the 2 places that compute styles
Now that the widget node recomputes styles on update_style() we can just
call it during validate(). That way, we don't need the widget node to
manually compute its style.
Benjamin Otte [Sun, 22 Feb 2015 22:11:22 +0000 (23:11 +0100)]
cssnode: Always return correct style values
If CSS values are queried from a widget, recompute them if necessary. Do
not emit style-updated until the validation phase however.
This way, we don't run into performance traps when style-update causes
invalidations that cause new style-updated to be emitted.
Benjamin Otte [Sun, 22 Feb 2015 17:04:43 +0000 (18:04 +0100)]
cssstyle: Add optimization
There is no difference between a style and itself.
Benjamin Otte [Sun, 22 Feb 2015 07:26:29 +0000 (08:26 +0100)]
stylecontext: Refactor gtk_style_context_invalidate()
There's no need anymore to recreate styles, nodes do that automagically
now.
This allows making gtk_css_node_set_style() private.
Benjamin Otte [Sun, 22 Feb 2015 07:23:04 +0000 (08:23 +0100)]
cssnode: Create animated styles by default
... and hardcode transient and path nodes to never create animated
styles.
Benjamin Otte [Sun, 22 Feb 2015 05:19:33 +0000 (06:19 +0100)]
cssnode: Add optimization
Don't even try to propagate changes when we know there are none.
Benjamin Otte [Sat, 21 Feb 2015 02:40:46 +0000 (03:40 +0100)]
cssnode: Change the way we start animations
We now have a flag for "invalidate animations", use that to restart
animations and decide if we want to start transitions.
Benjamin Otte [Fri, 20 Feb 2015 23:16:58 +0000 (00:16 +0100)]
cssnode: Return NULL as frame clock when animations are disabled
This is a crude hack, but it works.
FIXME: Hook it up to the GtkSettings so that we properly update when the
setting changes.
Benjamin Otte [Fri, 20 Feb 2015 23:15:04 +0000 (00:15 +0100)]
cssstyle: Handle 0 timestamp to mean "don't animate"
Benjamin Otte [Fri, 20 Feb 2015 16:36:10 +0000 (17:36 +0100)]
cssnode: Move style context function to only user
Benjamin Otte [Fri, 20 Feb 2015 16:28:23 +0000 (17:28 +0100)]
cssnode: Remove timestamp from gtk_css_node_validate()
GtkCssNode knows its own timestamp.
Benjamin Otte [Wed, 18 Feb 2015 23:54:14 +0000 (00:54 +0100)]
cssnode: Add API to query the timestamp
... and pass it to the API that computes new styles.
A special timestamp of 0 means "please don't animate" and is used when
no frame clock is available for a node.
Benjamin Otte [Wed, 18 Feb 2015 05:01:41 +0000 (06:01 +0100)]
cssnode: Make parent style change part of GtkCssNode
Benjamin Otte [Wed, 18 Feb 2015 04:55:38 +0000 (05:55 +0100)]
cssnode: Propagate pending changes after recomputing new style
This way we can propagate if the new style actually changed anything.
Benjamin Otte [Tue, 17 Feb 2015 15:11:38 +0000 (16:11 +0100)]
cssnode: Add gtk_css_node_invalidate_style_provider()
This function not just invalidates the current node, but also all
children.
Benjamin Otte [Tue, 17 Feb 2015 14:18:32 +0000 (15:18 +0100)]
cssnode: Change get_style_provider() vfunc
Instead of always returning a provider, allow the vfunc to return NULL
to mane "use same provider as parent". This allows a bunch of
optimizations.
Benjamin Otte [Tue, 17 Feb 2015 04:01:09 +0000 (05:01 +0100)]
cssnode: Implement a way to properly track invalidations
See the comment in gtkcssnodeprivate.h for how this works.
Benjamin Otte [Sat, 14 Feb 2015 05:45:21 +0000 (06:45 +0100)]
cssnode: Change vfunc
This is mainly an attempt to merge the update_style() and validte()
vfuncs. Code is not there yet, but that's the idea.
Also, gtk_css_node_set_style() should not be public. And this gets
closer to that goal, too.
Benjamin Otte [Sat, 14 Feb 2015 05:40:00 +0000 (06:40 +0100)]
cssnode: Only pass a boolean for parent changes
Nobody cares what changed in the parent, so don't track it.
Benjamin Otte [Sat, 14 Feb 2015 01:27:39 +0000 (02:27 +0100)]
cssvalue: Remove GtkCssDependencies
They are not used anymore.
Benjamin Otte [Sat, 14 Feb 2015 00:59:17 +0000 (01:59 +0100)]
cssstyle: Remove unused optimization
After measuring it, I realized the optimization never triggers for
Adwaita and rarely ever triggers for simple themes. So it is not
useful to keep it around.
Benjamin Otte [Fri, 13 Feb 2015 21:04:26 +0000 (22:04 +0100)]
csswidgetnode: Always return a valid style
Benjamin Otte [Fri, 13 Feb 2015 21:00:06 +0000 (22:00 +0100)]
csspathnode: Call gtk_style_context_validate()
Don't call gtk_style_context_invalidate(), that function does too much
work.
Benjamin Otte [Fri, 13 Feb 2015 20:21:46 +0000 (21:21 +0100)]
testsuite: Add another random stylecontext test
Benjamin Otte [Fri, 13 Feb 2015 18:57:55 +0000 (19:57 +0100)]
cssnode: Use the frame clock's time
... nstead of the monotonic time when validating a cssnode.
Benjamin Otte [Fri, 13 Feb 2015 11:44:04 +0000 (12:44 +0100)]
cssnode: Treat transient nodes as invisible nodes
Making transient nodes invisible allows us to remove special cases
without any bad side effects and they continue working just like they
did before.
Benjamin Otte [Tue, 10 Feb 2015 01:53:28 +0000 (02:53 +0100)]
reftests: Add a reftest for box sibling ordering
Benjamin Otte [Tue, 10 Feb 2015 01:50:57 +0000 (02:50 +0100)]
cssnode: Add visibility concept
This allows hiding nodes of invisible widgets.
And that in turn makes sure :nth-child() works as expected.
Benjamin Otte [Mon, 9 Feb 2015 21:51:28 +0000 (22:51 +0100)]
box: Use CSS nodes instead of widget paths
This is a very simple patch that causes a bunch of overhead. But it
works.
Benjamin Otte [Mon, 9 Feb 2015 21:27:44 +0000 (22:27 +0100)]
widget: Add gtk_widget_get_css_node()
and replace gtk_style_context_get_root() with it.
Benjamin Otte [Mon, 9 Feb 2015 21:03:13 +0000 (22:03 +0100)]
cssnode: Refactor node tree modification code
This allows adding more API for it.
It also includes code that tracks modifications and invalidates siblings
and their positions whenever nodes get added or removed.
Benjamin Otte [Mon, 9 Feb 2015 17:38:57 +0000 (18:38 +0100)]
cssnode: Add hackery to allow bypassing widget paths
If we know the parent's get_path_for_child() implementation is safe to
be used with GtkCssNode because it doesn't do anything special, we do
that. Unfortunately that requires whitelisting vfuncs because the vfunc
is public API so anyone can override it.
Benjamin Otte [Mon, 9 Feb 2015 16:26:07 +0000 (17:26 +0100)]
cssnode: Remove now unused arg from vfunc
Benjamin Otte [Mon, 9 Feb 2015 15:41:06 +0000 (16:41 +0100)]
cssnode: Add a matcher for nodes
... and use that matcher by default - ie for transient nodes.
Benjamin Otte [Mon, 9 Feb 2015 15:14:03 +0000 (16:14 +0100)]
cssnode: Make widget node not copy the path
Instead, use gtk_widget_get_path() which makes GtkWidget cache the path.
This is a temporary solution until we can get rid of widget paths.
This increases memory usage quite noticably.
Benjamin Otte [Mon, 9 Feb 2015 14:21:48 +0000 (15:21 +0100)]
cssnode: Make widget node use new matcher
Benjamin Otte [Mon, 9 Feb 2015 10:29:48 +0000 (11:29 +0100)]
cssnode: Make path node create matcher without copying
... the WidgetPath. This uses the functionality introduced in the
previous commits.
Benjamin Otte [Mon, 9 Feb 2015 10:24:29 +0000 (11:24 +0100)]
cssmatcher: Allow widget path matcher to take a node declaration
The node declaration has the same functionality as
gtk_css_node_declaration_add_to_widget_path(). So instead of using that
function on a path, you can use the original path and the declaration in
a matcher.
Benjamin Otte [Mon, 9 Feb 2015 08:41:48 +0000 (09:41 +0100)]
cssnode: Split out a function
So far the vfunc is kinda quirky (the path argument is an out argument
for something you have to free when you're done with the matcher), but
I'm about to change that.
Benjamin Otte [Sun, 15 Feb 2015 21:26:13 +0000 (22:26 +0100)]
widget: Create widget path classes from proper style
We don't want to add the current classes to the widget path - which
might potentially be different after a gtk_style_context_save() - but
the root node's ones. So what better thing to do than actually using the
root node?